String.prototype.resolve = function() {
   var value = this;
   var term = /(\$[a-zA-Z0-9]+)/;
   while (term.test(value)) {
      value = value.replace(RegExp.$1,String[RegExp.$1]);
   }
   return value.replace(/ /g,"");
}
String.prototype.trim =
function() {
  return this.replace( /^[ \n\r\t]+|[ \n\r\t]+$/g, "" );
}
